package spil;

public class Player {
	private int felt;
	private int number;
	private boolean winner;
	private boolean extraTurn;
	public Konto konto;
	
	public Player(int number) {
		felt = 0;			//starter på felt 1
		this.number = number;
		winner = false;
		extraTurn = false;
		konto = new Konto();
	}
	
	public void move(int move) {
		felt += move;
		felt = felt%11;		//sætter feltet til 0-10
	}
	
	public int getFelt() {
		return felt + 1;		//returnerer 1-11
	}
	
	public boolean hasWon() {
		return winner;
	}
	
	public void win() {
		winner = true;
	}
	
	public boolean extraTurn() {
		return extraTurn;
	}
	
	public void secondTurn() {
		extraTurn = true;
	}
	
	public void loseTurn() {
		extraTurn = false;
	}
	
	public String toString() {
		return "Player " + number;
	}
}
